home *** CD-ROM | disk | FTP | other *** search
- Path: fore.com!news
- From: Jeff Rosenfeld <jeffro@fore.com>
- Newsgroups: comp.lang.c
- Subject: Re: argc/argv & switches
- Date: Wed, 06 Mar 1996 16:16:04 -0500
- Organization: FORE Systems
- Message-ID: <313E0094.167EB0E7@fore.com>
- References: <4h2j8j$9gn@milo.freenet.vancouver.bc.ca> <danpop.825593142@rscernix>
- NNTP-Posting-Host: tango.fore.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; SunOS 4.1.4 sun4c)
-
- Dan Pop wrote:
- > Note that *++argv[0] is technically incorrect, because there is no
- > guarantee that argv[0] can be modified by the program, it can be legally
- > stored in a read only memory segment.
-
- Not so. The standard mandates that if main is defined with two
- parameters (which we'll call argc and argv), then:
-
- The parameters argc and argv and the strings pointed
- to by the argv array shall be modifiable by the program....
-
- -------------------------------
- Jeff Rosenfeld,
- who strives for the prosperity of but speaks not with the mouth of
- FORE Systems.
-